package com.eaoa.query.bus;


import com.eaoa.base.EABaseQuery;
import com.eaoa.vo.bus.BusVehicle;

public class BusVehicleQuery extends EABaseQuery{

	public BusVehicleQuery() {
		super(BusVehicle.class);
	}
	
	public void setVehicleno(Long val){
		setEQCondition("vehicleno", val);
	}
	
	public void setVehiclecode(String val){
		setLIKECondition("vehiclecode", val);
	}
	
	public void setDriver(String val){
		setLIKECondition("driver", val);
	}
	
	public void setIslock(String val){
		setEQCondition("islock", val);
	}
	
	public static BusVehicle loadByNO(Long val){
		BusVehicleQuery query = new BusVehicleQuery();
		query.setVehicleno(val);
		query.execute();
		if(query.getResults().size()!=1){
			return null;
		}
		return (BusVehicle)query.getResults().get(0);
	}
	
}